<template>
<div>
<el-row>
	<el-col :span="20">
	<el-form 
		:model="configInfo" 
		label-width="180px"
		>
		<el-form-item label="是否启用">
		    <el-switch v-model="configInfo.isshow" 
		    active-value="1" inactive-value="0"></el-switch>
		</el-form-item>

		<el-form-item label="商城简介" >
			<el-input type="textarea" v-model="configInfo.describe" placeholder="请输入商城简介" :rows="6"></el-input>
		</el-form-item>

		<el-form-item class="mt10">
		     <el-button type="primary" 
		     @click="onSubmit()">
		     保存</el-button>
		</el-form-item>

	</el-form>	
  	</el-col>
</el-row>
	

</div>		
</template>

<script>

import { mapGetters } from 'vuex';

export default {
	name: 'describe',
		data () {
		return {
		}
	},

	props: {
		configInfo : Object,
	},

	components: {
		
	},

	computed : {
		...mapGetters([
		]),
		
	},

	methods : {
		

	    onSubmit () {
	    	let para = {
	    		id : this.configInfo.id,
	    		isshow : this.configInfo.isshow,
	    		describe : this.configInfo.describe,
	    		cb : res => {
					this.$notify({
			          title: '成功',
			          message: '保存成功',
			          type: 'success'
			        });
				},
				err : res => {
					this.$notify({
			          title: '保存失败',
			          message: res,
			          type: 'error'
			        });
				}
	    	};

	    	this.$store.dispatch('updateConfig_describe', para);
	    }
	},

	watch:{
	    
	},

	mounted () {
	},

}
</script>

<style scoped>

</style>
